package com.lhq.message.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class KafkaController {
    @Autowired
    private KafkaTemplate<Object, Object> template;

    @GetMapping("/kafka/sendMessage")
    public void sendFoo(String message) {
        this.template.send("test", message);
    }
}
